{* 预定图书页面 *}
{include file="../header.html" title="图书预定"}

	<div id="main">
		<div id="main_title">您当前处于 
			<span class="weightFont">管理我的图书</span> >> 
			<span class="softFont">图书预定</span>
		</div>
		<div id="main_body">
			<div class="searchBox">
				类别:
				<select id="tid">
					<option value="0">--请选择--</option>
					{if $typeList}
					{foreach $typeList as $type}
					<option value="{$type['typeid']}">
						{$type['typename']}
					</option>
					{/foreach}
					{/if}
				</select>
				书名:
				<input type="text" id="title" name="title" placeholder="可输入书名精确查询名" />
				<span class="searchBtn">搜索</span>
			</div>
			{if $bookList}
			<center>
				<form id="listForm">
					<table id="bookList" cellpadding="5" cellspacing="0">
						<tr>
							<th>图书号</th>
							<th>图书名</th>
							<th>作者</th>
							<th>出版时间</th>
							<th>简介</th>
							<th>操作</th>
						</tr>
						{foreach $bookList as $book}
						<tr>
							<td>
								{$book['bid']}
							</td>
							<td>
								{$book['title']}
							</td>
							<td>{$book['author']}</td>
							<td>{$book['pubtime']|date_format:"%Y-%m-%d"}</td>
							<td class="description">
								{if $book['description']}
								{$book['description']}
								{else}暂无
								{/if}
							</td>
							<td>
								{if $book['is_lend']}
								<span>已借出<span>
								{else}
								<span class="yudingBtn" name="{$book['bid']}">预定</span>
								{/if}
							</td>
						</tr>
						{/foreach}
					</table>
					<input type="hidden" value="{$userInfo['userName']}" id="userName" />
				</form>
				<!--翻页条-->
				{if $show_pageBox}
				<div class="pageDiv">{$pageBox}</div>
				{/if}
			</center>
			{else}
			{if $show_pageBox}
			<div class="noContent">暂时没有藏书</div>
			{/if}
			{/if}
		</div>
	</div>

{include file="../footer.html"}